<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>浮动-清除浮动</title>
  <style>
    .top {
      margin: 10px auto;
      width: 1200px;
      height: 300px;
      background-color: pink;
    }

    .top .left {
      float: left;
      width: 200px;
      height: 300px;
      background-color: skyblue;
    }

    .top .right {
      float: right;
      width: 950px;
      height: 300px;
      background-color: orange;
    }

    .bottom {
      height: 100px;
      background-color: brown;
    }
  </style>
</head>

<body>
  <div class="top">
    <div class="left"></div>
    <div class="right"></div>
  </div>
  <div class="bottom"></div>
</body>

</html>